package com.jweb.plugins.rpc;

import com.jweb.framework.core.ConfigHandle;
import com.jweb.framework.util.WebUtil;

public class Constant {
	// 使用 ZooKeeper 客户端命令行创建/JWEB_RPC永久节点，用于存放所有的服务临时节点。
	public static final String ZK_REGISTRY_PATH = ConfigHandle.getString("rpc.registry.root", "/JWEB_RPC");
	public static final int ZK_SESSION_TIMEOUT = ConfigHandle.getInt("rpc.registry.timeout", 5000);
	public static final String ZK_ADDRESS = ConfigHandle.getString("rpc.registry.address", "127.0.0.1:2181");

	public static final int RPC_SERVER_TIMEOUT = ConfigHandle.getInt("rpc.server.timeout", 5000);
	public static final int RPC_SERVER_PROT = ConfigHandle.getInt("rpc.server.port", 8811);
	public static final String RPC_SERVER_HOST = ConfigHandle.getString("rpc.server.port", WebUtil.getLocalRealIp());
	
	public static final int RPC_CLIENT_TIMEOUT = ConfigHandle.getInt("rpc.client.timeout", 5000);
	
	

	public static final String PROVIDERS = "providers";
	public static final String CONSUMERS = "consumers";

}
